// 设置默认dojo参数
if(dj_undef("djConfig", this)){
    var djConfig = {};
}

djConfig.bindEncoding = "utf-8";


// 设置应用程序参数
if(dj_undef("lotexConfig", this)){
    var lotexConfig = {};
}

// 服务器是否在线
lotexConfig.online = (location.protocol=="http:") ? true : false;
lotexConfig.baseurl = lotexConfig.online ?
    "http://localhost:8080/rptps3" :
    "file:///D:/rptp/trunk/ajaj/dojo-lotex/tests/mock/jsonResponse";

// 是否打开debug模式
lotexConfig.debug = this["djConfig"]&&
    ((djConfig["isDebug"])||(djConfig["debugAtAllCosts"]));

if (lotexConfig.debug)
    document.title = document.title + " @ "
                + (lotexConfig.online ? "online" : "offline");


dojo.require("dojo.widget.*");

dojo.registerModulePath ("lotex","../../dojo-lotex/src");
dojo.registerModulePath ("rptp","../../rptp/src");
dojo.registerNamespace("lotex", "lotex.widget",
    function(name){
        return "lotex.widget."+dojo.string.capitalize(name);
    }
);

dojo.require("lotex.lang");
dojo.require("lotex.debug");

lotex.version = {
    major: 0, minor: 8, patch: 0, flag: "+",
    revision: Number("$Rev 74$".match(/[0-9]+/)[0]),
    toString: function(){
        with(lotex.version){
            return major + "." + minor + "." + patch + flag + " (" + revision + ")";    // String
        }
    }
}

var b = lotex.debug.breakpoint;
var b2 = lotex.debug.breakpoint2;
var d = dojo.debug;
var dd = dojo.debugShallow;

function tic () {
    tic.time = new Date();
}

function toc (str) {
    var time = new Date().getTime() - tic.time.getTime();
    var p = document.createElement("p");
    p.appendChild(document.createTextNode(time + " - " + str));
    document.body.appendChild(p);
}